package org.acghub.langchain4j.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.ApplicationEventPublisherAware;
import org.springframework.context.ApplicationStartupAware;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.metrics.ApplicationStartup;
import org.springframework.jmx.export.notification.NotificationPublisher;
import org.springframework.jmx.export.notification.NotificationPublisherAware;

@Configuration
@Slf4j
public class LangChain4jConfig implements ApplicationContextAware, BeanFactoryAware, ApplicationEventPublisherAware, ApplicationStartupAware, NotificationPublisherAware {
    @Override
    public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
        log.info("[LangChain4jConfig]setBeanFactory start, beanFactory={}", beanFactory);
    }

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        log.info("[LangChain4jConfig]setApplicationContext start, applicationContext={}", applicationContext);
    }

    @Override
    public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) {
        log.info("[LangChain4jConfig]setApplicationEventPublisher start, applicationEventPublisher={}", applicationEventPublisher);
    }

    @Override
    public void setApplicationStartup(ApplicationStartup applicationStartup) {
        log.info("[LangChain4jConfig]setApplicationStartup start, applicationStartup={}", applicationStartup);
    }

    @Override
    public void setNotificationPublisher(NotificationPublisher notificationPublisher) {
        log.info("[LangChain4jConfig]setNotificationPublisher start, notificationPublisher={}", notificationPublisher);
    }
}
